package com.fengsh.cs;
/**
 * @标题
 * @作者 fengsh998
 * @创建时间 2024/1/20
 * @功能描述
 */
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
@RefreshScope
public class CSGatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(CSGatewayApplication.class, args);
    }

    @Value("${app}")
    private String app;

    @Value("${cloud.config.name}")
    private String name;

    @GetMapping("test")
    public String test() {
        return app + ":" + name;
    }
}